package com.learn.design.visitor.example;

import java.util.Random;

/**
 * 经理类
 *
 * @author xhn
 */
public class Manager extends Staff {

    public Manager(String name) {
        super(name);
    }

    @Override
    void accept(Visitor visitor) {
        visitor.visit(this);
    }

    /**
     * 一年做的产品数量
     *
     * @return 数量
     */
    public int getProducts() {
        return new Random().nextInt(10);
    }
}
